#pragma once
#include <QDockWidget>
#include "ui_StatisticWidget.h"
#include "utilities/utilities.h"
#include "utilities/PacketArray.h"
#include "utilities/GlobalState.h"
#include "utilities/GlobalStatistic.h"

#include <QtCore/Q_UINT64>

class StatisticWidget : public QWidget, public Ui::StatisticWidgetBar
{
public:
	StatisticWidget(QWidget* parent = NULL);
	QDockWidget* getStatisticDock();
protected:
	void timerEvent(QTimerEvent *event);
private:
	void initStatistic();

	QTime btime;
	int mbytes;
	int mTimerId;
	int mPrePackets;
	shared_ptr<GlobalState> mGlobalState;

	quint64 mPreParsedBytes;
	quint64 mPreParsePackets;
};